@import "../../styles/variables.less";

.ip-dashboard {
  width: 100%;
  height: 100vh;
  background: @bg-dark;
  background-image: url(/assets/img/background.png);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: @text-color;
  overflow: hidden;
  font-family: "微软雅黑", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  position: relative;
}

// 标题栏
.ip-header {
  height: 20%;
  background: @bg-header;
  box-shadow: @box-shadow;
  background-image: url(/assets/img/header.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  background-position: 0 20%;
  position: relative;
  .ip-title {
    color: @text-color;
    text-shadow: 0 0 10px @primary-glow;
    letter-spacing: 2px;
    font-family: YouSheBiaoTiHei;
    font-size: 35px;
    color: #ffffff;
    letter-spacing: 0;
    text-shadow: 0 3px 4px #00507abf;
    position: absolute;
    top: 0;
    right: 50%;
    transform: translateX(50%);
  }

  .ip-weather {
    display: flex;
    align-items: center;
    font-size: 1.5vh;

    .date-time,
    .weather-info {
      margin-left: 20px;
    }
  }

  // 进入后台按钮样式
  .ip-admin-button {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 100;

    .enter-admin-btn {
      background: linear-gradient(
        180deg,
        rgba(0, 146, 214, 0.8) 0%,
        rgba(3, 27, 103, 0.9) 100%
      );
      border: 1px solid rgba(0, 198, 255, 0.8);
      box-shadow: 0 0 15px rgba(0, 162, 255, 0.7);
      border-radius: 20px;
      padding: 2px 20px;
      font-family: YouSheBiaoTiHei;
      font-size: 16px;
      color: #ffffff;
      text-shadow: 0 0 5px rgba(0, 162, 255, 0.7);
      cursor: pointer;
      transition: all 0.3s ease;
      position: relative;
      overflow: hidden;
      
      &::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(
          90deg,
          transparent,
          rgba(255, 255, 255, 0.2),
          transparent
        );
        transition: all 0.5s;
      }

      &:hover {
        background: linear-gradient(
          180deg,
          rgba(0, 162, 255, 0.9) 0%,
          rgba(12, 42, 136, 1) 100%
        );
        box-shadow: 0 0 20px rgba(0, 198, 255, 0.9);
        
        &::before {
          left: 100%;
        }
      }

      &:active {
        transform: scale(0.98);
      }
    }
  }
}

// 主体内容
.ip-content {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-gap: 1vh;
  padding: 1vh 2vh;
  height: 92vh;

  .left-panel,
  .right-panel {
    display: flex;
    flex-direction: column;
    gap: 1vh;
    height: 100%;

    .panel-item {
      flex: none;
      height: 29vh;
      border-radius: 4px;
      background-image: url(/assets/img/box_header_bg.png);
      background-position: 0 -20px;
      padding: 0;
    }
  }

  .center-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;

    .panel-item {
      width: 100%;
      height: 92vh;
      background: transparent;
      background-image: url(/assets/img/center-panel.png);
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;
      border: none;
      border-radius: 4px;
      padding: 0;
    }
  }
}
.ip-footer {
  bottom: 0;
  width: 100%;
  height: 5%;
  background: linear-gradient(180deg, #003871e4 0%, #2f60c4ab 100%);
  box-shadow: 0 0 20px rgba(0, 100, 255, 0.5);
  background-image: url(/assets/img/footer.png);
  background-size: 100% auto;
  background-repeat: no-repeat;
  position: absolute;
  z-index: 0;
}
// 概览组件样式
.ip-overview {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1vh;
  justify-content: space-around;

  .ip-overview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1vh;
    position: relative;

    .ip-overview-stack {
      width: 8vh;
      height: 5vh;
      background: rgba(0, 150, 255, 0.2);
      border: 1px solid rgba(0, 150, 255, 0.5);
      border-radius: 5px;
      margin-bottom: 1vh;
    }

    .ip-overview-label {
      font-size: 1.5vh;
      color: #8eb9ff;
      margin-bottom: 0.5vh;
    }

    .ip-overview-value {
      font-size: 2vh;
      color: #29e4ff;
      font-weight: bold;
    }
  }
}

// 图表组件样式
.ip-chart {
  display: flex;
  height: 100%;
  padding: 1vh;

  .chart-container {
    display: flex;
    width: 100%;
    align-items: center;

    .chart-circle {
      width: 12vh;
      height: 12vh;
      border-radius: 50%;
      background: radial-gradient(
        circle,
        rgba(0, 120, 255, 0.1),
        rgba(0, 80, 255, 0.3)
      );
      border: 2px solid rgba(0, 150, 255, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 0 15px rgba(0, 100, 255, 0.4);

      .chart-total {
        font-size: 2.5vh;
        color: #29e4ff;
        font-weight: bold;
      }
    }

    .chart-legend {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      margin-left: 2vh;

      .chart-legend-item {
        display: flex;
        align-items: center;
        margin-bottom: 1vh;

        .legend-color {
          width: 1.5vh;
          height: 1.5vh;
          margin-right: 1vh;

          &.color-0 {
            background-color: #6a5acd;
          }
          &.color-1 {
            background-color: #ff6347;
          }
          &.color-2 {
            background-color: #32cd32;
          }
          &.color-3 {
            background-color: #ffd700;
          }
          &.color-4 {
            background-color: #8a2be2;
          }
          &.color-5 {
            background-color: #ff4500;
          }
        }

        .legend-type {
          color: #ecf7ff;
          margin-right: 1vh;
          font-size: 1.5vh;
        }

        .legend-count {
          color: #29e4ff;
          font-size: 1.5vh;
        }
      }
    }
  }
}

// 数据中心样式
.ip-data-center {
  position: relative;
  height: 100%;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  .circle-effect-in {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 40, 80, 0.2), transparent);
    border-radius: 50%;
    border: 1px solid rgba(0, 120, 255, 0.3);
    position: absolute;
    top: 0;
    left: 0;
    transform: rotate(180deg);
  }
  .circle-effect-out {
    width: 90%;
    height: 90%;
    background: radial-gradient(circle, rgba(0, 40, 80, 0.2), transparent);
    border-radius: 50%;
    position: absolute;
    top: 5%;
    left: 5%;
    border: 1px solid rgba(0, 120, 255, 0.3);
  }

  .center-background {
    width: 90%;
    height: 80%;
    background: radial-gradient(circle, rgba(0, 40, 80, 0.2), transparent);
    border-radius: 50%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 99;
  }
  .center-data {
    width: 100%;
    height: 20%;
  }
  .data-box {
    background-image: url(/assets/img/center-text.png);
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 4px;
    padding: 1vh;
    text-align: center;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    min-width: 12vh;
    width: 40%;
    box-shadow: 0 0 15px rgba(0, 80, 255, 0.3);

    .data-title {
      font-family: YouSheBiaoTiHei;
      font-size: 24px;
      color: #c6ffff;
      margin-bottom: 0.5vh;
    }

    .data-value {
      font-weight: bold;
      font-size: 22px;
      color: #ffffff;
      &.big-value {
        font-size: 2.5vh;
      }
    }

    &.main-data {
      box-shadow: 0 0 20px rgba(0, 100, 255, 0.5);
      padding: 1.5vh;
      width: 45%;
      min-width: 15vh;
      background-image: url(/assets/img/center-center.png);
      background-size: 100% 100%;
      background-position: center;
      background-repeat: no-repeat;
    }
  }

  .center-top-data {
    display: flex;
    align-items: center;
    justify-content: start;
    .data-box {
      margin-left: 10px;
    }
  }

  .center-main-data {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .center-bottom-data {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    width: 100%;
    .right-data {
      margin-bottom: 20px;
    }
  }

  .center-left-data {
  }

  .center-right-data {
    display: flex;
    align-items: center;
    justify-content: end;
  }
}

// 部门排名样式
.department-rank {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1vh;
  justify-content: space-around;

  .rank-item {
    margin-bottom: 1vh;

    .rank-label {
      display: flex;
      align-items: center;
      margin-bottom: 0.5vh;

      .rank-num {
        color: #29e4ff;
        margin-right: 1vh;
        font-size: 1.5vh;
        font-weight: bold;
      }

      .rank-name {
        color: #ecf7ff;
        font-size: 1.5vh;
      }
    }

    .rank-bar-container {
      display: flex;
      align-items: center;
      height: 1.5vh;
      background: rgba(0, 30, 80, 0.3);
      border-radius: 10px;
      position: relative;

      .rank-bar {
        height: 100%;
        border-radius: 10px;
        transition: width 1s;
      }

      .rank-score {
        position: absolute;
        right: 10px;
        color: #ecf7ff;
        font-size: 1.2vh;
      }
    }
  }
}

// 核心知识产权样式
.ip-core-container {
  text-align: center;
  width: 100%;
  height: 80%;
  .ip-core {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1vh;
    .ip-core-item {
      display: flex;
      width: 100%;
      margin-bottom: 0.5vh;
      .ip-core-item-title {
        height: 100%;
        padding: 0.5vh;
        background-size: 100% 100%;
        font-weight: 400;
        font-family: SourceHanSansCN-Regular;
        font-size: 14px;
        background-image: url(/assets/img/core-text.png);
        background-position: center;
        background-repeat: no-repeat;
      }
    }
    .ip-core-item-1 {
      justify-content: center;
      margin-right: 1vh;
    }
    .ip-core-item-2 {
      justify-content: space-around;
      .ip-core-item-title {
        background-image: url(/assets/img/core-green.png);
      }
    }
    .ip-core-item-3 {
      justify-content: center;
      .ip-core-item-title {
        background-image: url(/assets/img/core-center.png);
        font-size: 18px;
        font-family: YouSheBiaoTiHei;
        color: #ffffff;
      }
    }
    .ip-core-item-4 {
      justify-content: space-around;
      .ip-core-item-title {
        background-image: url(/assets/img/core-green.png);
      }
    }
    .ip-core-item-5 {
      justify-content: center;
      .ip-core-item-title {
        background-image: url(/assets/img/core-text.png);
      }
    }
  }
}

// 天气组件样式
._weather_container {
  display: flex;
  align-items: center;
  border-radius: 4px;
  width: 20%;
  padding: 0.8vh 1.5vh;

  .column1,
  .column2 {
    display: flex;
    font-family: Helvetica;
    font-size: 16px;
    color: #ffffff;
    width: 50%;
    align-items: center;
    color: #ecf7ff;

    div {
      margin: 0.3vh 0.3vh;
    }
  }

  ._divider {
    height: 3vh;
    width: 1px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 1.5vh;
  }
}
